/**
 * 
 */
package com.cnhaimei.vod.net;

/**
 * @author jin001.wu@gmail.com <br>
 * @date 2011-7-28
 *
 */
public abstract class Request {
	public static final int TYPE_UNDEFINE = 0;
	public static final int TYPE_DCReq 	= 1;
	public static final int TYPE_DCHeart = 2;
	public static final int TYPE_DQReq 	= 3;
//	public static final int TYPE_DQheart = 4;
	
	
	public final static int STATE_REQ = 0;
	public final static int STATE_RUNNING = 1;
	public final static int STATE_RESPONSED = 2;
	
	protected long id;
	protected int state;
	protected int type;
	
	public Request() {
		state = STATE_REQ;
		type = TYPE_UNDEFINE;
	}
	
	public Request(int type) {
		state = STATE_REQ;
		this.type = type;
	}
	
	public int getSocketType() {
		return type;
	}

	public int getState() {
		return state;
	}

	/**
	 * @return the id
	 */
	public long getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(long id) {
		this.id = id;
	}

	/**
	 * @return the type
	 */
	public int getType() {
		return type;
	}

	/**
	 * @param type the type to set
	 */
	public void setType(int type) {
		this.type = type;
	}

	/**
	 * @param state the state to set
	 */
	public void setState(int state) {
		this.state = state;
	}

	public abstract void onResponsed();

}
